import { App } from 'vue'

// import 'element-plus/theme-chalk/base.css'
import 'element-plus/theme-chalk/index.css'

import {
  ElAside,
  ElButton,
  ElCheckbox,
  ElCol,
  ElContainer,
  ElDatePicker,
  ElForm,
  ElFormItem,
  ElHeader,
  ElInput,
  ElLink,
  ElMain,
  ElMenu,
  ElMenuItem,
  ElOption,
  ElRadio,
  ElRow,
  ElSelect,
  ElSubMenu,
  ElTabPane,
  ElTabs,
  ElTimePicker
} from 'element-plus/lib'

const components = [
  ElButton,
  ElForm,
  ElFormItem,
  ElInput,
  ElRadio,
  ElTabs,
  ElTabPane,
  ElCheckbox,
  ElLink,
  ElContainer,
  ElMain,
  ElHeader,
  ElAside,
  ElMenu,
  ElMenuItem,
  ElSubMenu,
  ElSelect,
  ElDatePicker,
  ElCol,
  ElOption,
  ElTimePicker,
  ElRow
]

export default function (app: App): void {
  for (const cpn of components) {
    app.component(cpn.name, cpn)
  }
}
